#
# StarWind iSCSI server configuration file.
#
# Copyright (c) 2003-2005 Rocket Division Software. All rights reserved.
#
# This file contains list of SCSI devices that will be accessible to iSCSI.
# The device name should be placed in the first column followed by the target 
# name. The device name and the target name should be separated by at least 
# one space. 
#
# $Id: starwind.conf,v 1.3 2005/03/09 19:26:10 valery Exp $
#

[parameters]

#
# LogLevel values: (0-DIsabled, 1-Errors, 2-Warnings, 3-all messages)
#
LogLevel = "1"

#
# Don't change the LogMask if you have no idea what does it mean!
#
LogMask = "0x8000ffff"

#
# Port number for iSCSI connectons
#
Port = "3260"

#
# Interface to listen to. "0.0.0.0" corresponds to "listen to all interfaces".
#
Interface = "0.0.0.0"

#
# change format of a target name
#
DefTargetName = "iqn.2003-06.starwind:bartpe.$(symid)"

#
# Username and password used for the control connection.
#
Login = ""
Password = ""

#
# CHAP authentification for control connections
#
#CtlAuthMode = "chap"
#CtlAuthServerName = "BartPE"
#CtlAuthServerSecret = "123"
#CtlAuthClientName = "user"
#CtlAuthClientSecret = "345"

#
# Minimal 'maximum transfer length' should be supported by all SPTI devices
#
MinBufferSize = "65536"

#
# 'Minimal' aligment mask for SPTI devices - all buffers passed to SPTI will 
# be aligned according to this mask at least. Sure if an adapter requests 
# bigger aligment target will supply correctly aligmned buffers.
#
AlignmentMask = "0x0000"

#
# Allow Auto Export of some of the found Devices
#
AutoExportDevices = "spti:disk,spti:cd/dvd"

#
# Devices are autoexported as read/write by default
# set AutoConfigMode="ro" to allow only readonly access to all the devices
#
AutoExportMode = "ro"

#
# Length of iSCSI queue. (min 16, max 512, default 64)
#
MaxPendingRequests = "64"


[plugins]

#
# Plugins
#
# Parameters (mandatory):
#     -module  - plugin dll
#     -symlink - device name prefix for all devices managed by the plugin
#     -type    - type of devices managed by the plugin
#   (optional):
#     -loglevel:"n" (n=0-3) - override log level for a plugin (by default global LogLevel value is used)
#

#
# Ram Disk plugin
#
addplugin -module:"RamDisk.dll" -symlink:"RamDrive" -type:"RAM disk"

#
# ImageFile-specific parameters (mandatory):
#     imagedir  - image files directory. The plugin scans this directory for available images.
#     imagemask - image file mask. While scanning the directory (see above) the plugin will 
#         look only for files selected by this mask.
#
addplugin -module:"ImageFile.dll" -symlink:"ImageFile" -type:"Image file" -imagedir:"images" -imagemask:"*.img"

#
# VirtualDvd-specific parameters (optional):
#     share - sharing option flags. May be '', 'r', 'w' or 'rw'. 'r' means that device will be 
#         shared for reading. 'w' - for writing. Default is ''.
#     sessions - number of simultaneous iSCSI session allowed for this device. Default is 1.
#
addplugin -module:"VirtualDvd.dll" -symlink:"VirtualDvd" -type:"Virtual DVD"


[devices]

#
# Hard drive accessible through SPTI
#
#add \\.\Physicaldrive0

#
# SPTI-specific device parameters (optional)
#   -timeout:nnn  - SCSI command execution timeout (in seconds). Default is 108000 (30 hours).
#   -share:"<rw|r>" - to allow multiple initiators to access the device (shared mode)
#   -sessions:nnn - set maximum number of initiators allowed to mount the device in shared mode
#

#
# CD-ROM accessible through SPTI
#
#add \\.\Z:

# Share a hard drive or a CD-ROM to multiple clients
#add \\.\F: -timeout:256 -share:"rw" -sessions:8

#
# ImageFile device parameters:
#   -file   - image files name. This name is relative to 'imagedir'. The file should exists. 
#              It can be created by means of 'mksparse' utility.
#   -header - if not 0 the plugin will not use given amoung of bytes in the beginning of the file,
#         This value should be sector aligned.
#   -asyncmode:<no|yes> - if 'yes' the image is opened in asyncronous mode (you can benefit from this on stripped volumes)
#
#add ImageFile0 -file:"image.img" -asyncmode:"yes"

#
# RAM disk device parameters:
#   -size   - size of RAM disk to create (in MB).
#   -format - if 'yes' created disk will be formatted as FAT16 partition.
#   -useawe:<no|yes> - allows creating of huge ram drives (>1GB)
#	 But the AWE mode is a bit slower than not using AWE!
#   -speedtest:<no|yes> - can be used for network throughput tests.
#	 In the mode no data actually are written to or read from the ram disk.
#
#add RamDrive0 -size:"16" -format:"yes"

#
# Virtual DVD device parameters:
#   -file - image (iso or mds) file name.
#   -type - 'iso' or 'mds' depending on type of the image.
#
#add VirtualDvd0 -file:"D:\temp\iwin2k.iso" -type:"iso"


[permissions]

#
# CHAP authentication
#

#allow -device:RamDrive0 -chapLocalName:"iqn.1991-05.com.microsoft:home.MSHOME.NET" -chapLocalSecret:"5432109876543210" -chapPeerSecret:"0123456789012345"
#allow -chapLocalName:"test" -chapLocalSecret:"5432109876543210" -chapPeerName:"" -chapPeerSecret:"0123456789012345"
